package com.sk.tools.excel.meta.model.ser;

import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.sk.tools.excel.validator.Validator;

import java.io.IOException;

public class ValidatorJsonSerializer extends JsonSerializer<Validator> {


    @Override
    public void serialize(Validator validator, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeString(validator.getClass().getSimpleName().toLowerCase());
    }
}
